package com.yanqu.road.server.cmd.chefduel.process2.cross;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.chefduel.ChefDuelProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.manger.activity.chefduel.ChefDuelMgr;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_CROSS_CHEF_DUEL2_TABLE_SYNC, desc = "")
public class CrossTableSyncCmd extends AbstractCommand {

	private long userId;
	private int activityId;


	@Override
	public boolean parseData(YanQuMessage packet) throws Exception {
		return true;
	}

	@Override
	public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
		ChefDuelProto.CrossChefDuel2TableSyncMsg crossSyncMsg = ChefDuelProto.CrossChefDuel2TableSyncMsg.parseFrom(packet.getBytes());
		activityId = crossSyncMsg.getActivityId();

		ChefDuelMgr.syncTable(activityId,crossSyncMsg);
	}

	@Override
	public void sendData(GamePlayer player) {

	}
}
